<HTML><HEAD><TITLE>Protocol</TITLE></HEAD>
<BODY>
<!#CLASSDEF
Protocol FileEventSource
#ENDCLASSDEF>
<H1>Protocol</H1>

<P>Handles the nitty-gritty details of sending and recieving requests and
responses across a communication protocol.  
<P>Since protocols must be unpickleable, there may be multiple instances of the
same protocol object.  Therefore, there should generally be some object that the
protocol can locate within its <U></U>setattr<U></U> method that actually houses
the single instance of the connection that the multiple protocol objects refer
to.  
<H2>Base Classes</H2>
<UL>
<LI>FileEventSource
</UL>
<H2>Methods</H2>
<UL>
<LI><A HREF="#getNext(self)">getNext(self)</A>
<LI><A HREF="#getProtocolId(self)">getProtocolId(self)</A>
<LI><A HREF="#send(self,_msg)">send(self, msg)</A>
</UL>
<A NAME="getNext">
<A NAME="getNext(self)">
<H3>getNext(self)</H3>
<PRE>
   def getNext(self):
</PRE>

<P>Derived classes must implement this to get the next object received on the
protocol.  Should return <B>None</B> if the connection closes.  
<A NAME="getProtocolId">
<A NAME="getProtocolId(self)">
<H3>getProtocolId(self)</H3>
<PRE>
   def getProtocolId(self):
</PRE>

<P>Derived classes must use implement this to return a unique protocol id.
Protocol ids should be strings beginning with a type identifier followed by a
colon (e.g.  "tcp:") and followed by a value that uniquely identifies the
connection.  
<A NAME="send">
<A NAME="send(self,_msg)">
<H3>send(self, msg)</H3>
<PRE>
   def send(self, msg):
</PRE>

<P>Sends a request or response message through the protocol.  
</BODY></HTML>
